package com.example.myhuangye.YH;

import android.content.Intent;
import android.net.Uri;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import com.example.myhuangye.R;

public class MainYH5ctivity extends AppCompatActivity implements View.OnClickListener{
    private Button YHID5;
    private Button btn_call5;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main_yh5ctivity);
        YHID5 = (Button) findViewById(R.id.YHID5);
        YHID5.setOnClickListener(this);

        btn_call5 = (Button) findViewById(R.id.btn_call5);
        btn_call5.setOnClickListener(this);

        findViewById(R.id.HT5).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                finish();
            }
        });

    }//回退//

    public void onClick(View view) {//点击事件//
        switch (view.getId()){
            case R.id.YHID5:
                Uri uri = Uri.parse("http://www.bankcomm.com");
                Intent intent = new Intent(Intent.ACTION_VIEW, uri);
                startActivity(intent);

                break;
            case R.id.btn_call5:
                Intent intent1=  new Intent(Intent.ACTION_DIAL);
                intent1.setData(Uri.parse("tel:95559"));
                startActivity(intent1);
                break;

        }


    }




}
